﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace _055
{
    internal class Program
    {
        public static void CallToChildThrea()
        {
            Console.WriteLine("执行子线程");
            //线程暂停5000毫秒
            int sleepfor = 5000;
            Console.WriteLine("子线程暂停{0}秒",sleepfor/1000);
            Thread.Sleep(sleepfor);
            Console.WriteLine("继续执行子线程");
        }
        static void Main(string[] args)
        {
            ThreadStart childref = new ThreadStart(CallToChildThrea);
            Console.WriteLine("在Main函数中创建子线程");
            Thread childThread = new Thread(childref);
            childThread.Start();
            Console.ReadKey();
        }
    }
}
